package com.zy.controller;

import com.alibaba.fastjson.JSON;
import com.zy.mapper.ResourceMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/app")
public class AppResourceController {
    @Autowired
    ResourceMapper resourceMapper;

    /**
     * 获取日程配置
     *
     * @return java.lang.String
     * @author 小熊
     * @date 2021-04-08 9:23
     */
    @ResponseBody
    @RequestMapping(value = "/getResource", produces = "text/plain;charset=utf-8")
    public String getResource() {
        return JSON.toJSONString(resourceMapper.selectList(null));
    }
}
